package com.sy.musicapp.intent.service

import com.sy.musicapp.model.Banner
import com.sy.musicapp.model.BaseResponse
import com.sy.musicapp.model.UserInfo
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface UserService {
    @POST("login/cellphone")
    fun loginWithPhone(
        @Query("phone") phone: String,
        @Query("password") pwd: String,
        @Query("timestamp") timestamp: String = System.currentTimeMillis().toString()
    ): Call<UserInfo>

    @POST("login")
    fun loginWithEmail(
        @Query("email") email: String,
        @Query("password") pwd: String,
        @Query("timestamp") timestamp: String = System.currentTimeMillis().toString()
    ): Call<UserInfo>

    @POST("logout")
    fun logout(): Call<BaseResponse>

    @GET("login/refresh")
    fun updateStatus(): Call<BaseResponse>

    @GET("login/status")
    fun getUserInfo(): Call<UserInfo>

    @GET("banner?type=1")
    fun getBanner(): Call<List<Banner>>

}